package server;
/**
 * This class represents the validation of the passwords
 * check if the password is corrected or not
 * @author ldong
 *
 */
public class BasicPassword {

	int currHash = 0;
	public static void main(String[] args) {
		BasicPassword test = new BasicPassword();
		System.out.println(test.passHash("HELLOWORLD"));
		System.out.println(test.passCheck("THISSHOUDLBREAK?"));
		System.out.println(test.passCheck("HELLOWORLD"));


	}
	
	/**
	 * Change the passwords into hashcodes
	 * @param pass
	 * @return
	 */
	private int passHash(String pass){
		currHash = pass.hashCode();
		return pass.hashCode();
	}
	
	/**
	 * password validation
	 * @param pass
	 * @return
	 */
	private boolean passCheck(String pass){
		if(pass.hashCode() == currHash)
			return true;
		return false;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
